<?php

class VerifyTokenPreHandler extends Fs2PreHandler
{

    /**
     * @see SzAbstractCtrlPreProcessHandler::handle
     *
     * @param array $inputs passed by reference, params inputted from $_REQUEST['*']
     * @return boolean
     * @throws 20073
     */
    public function handle(&$inputs)
    {
        if ($this->checkHandleExclude($inputs)) {
            return true;
        }

        $userId = $this->parseUserId($inputs);
       if ($userId > 0) {
            GameService::get()->verifySessionToken($userId);
        } else {
            throw new SzException(20073);
        }
        return true;
    }

}